const { defineConfig } = require('@vue/cli-service')
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

const isProd = process.env.NODE_ENV === 'production'


module.exports = defineConfig({
  productionSourceMap: true,
  configureWebpack: {
    devtool: isProd ? 'source-map' : 'cheap-source-map',
    resolve: {
      alias: {
        '@': resolve('src'),
      }
    }
  }
})